/**
 * @author liuxin
 * @e-mail lxtobe5@gmail.com
 * @update 2011.11.19
 * @prompt If you find my mistake, please contact with me via my e-mail.
 */
package API_sample
{
	import com.utils.TraverseObjectUtil;
	
	import flash.display.Sprite;

	public class Object_sample extends Sprite
	{
		public function Object_sample()
		{
			var o:Object = {};
			o.a = 1;
			o.b = 2;
			var aa:Array = TraverseObjectUtil.getPropertyName(o);
			for (var j:int = 0; j < aa.length; j++) 
			{
				trace(aa[j]+":"+o[aa[j]]);  //对于Object和其实例，describeType解析XML为空
			}
			//遍历属性
			for (var m:* in o)
			{
				trace(m); // b,a
			}
			//遍历属性值
			for each (var k:* in o)
			{
				trace(k); // 2,1
			}
		}
	}
}